package org.example.controller;

import lombok.extern.slf4j.Slf4j;
import org.example.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author:stefanie-zy
 * @time:2023/11/28-9:23
 * @description:
 */
@RestController
@Slf4j
@RequestMapping(value = "/api-test")
public class TestController {

    @Autowired
    private TestService testService;

    @GetMapping(value = "/test1")
    public String test1() throws InterruptedException {
        String result = "这是一个测试类当中的测试接口-test1";
        log.info("返回结果：{}", result);
        Thread.sleep(10000);
        return testService.test();
    }
}
